-
Notifications
You must be signed in to change notification settings - Fork 67
[semconv]: Add support for new formal DB semantic convention keys #1162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ADOT Java currently uses some deprecated incubating semconv keys. This PR adds support for the newly introduced formal semconv keys that replace them, while maintaining backward compatibility by falling back to the legacy keys when necessary. **Deprecated keys:** - DB_NAME - DB_OPERATION - DB_STATEMENT - DB_SYSTEM (Reference: https://github.com/open-telemetry/semantic-conventions-java/blob/release/v1.34.0/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java#L322-L327) **New keys:** - DB_NAMESPACE - DB_OPERATION_NAME - DB_QUERY_TEXT - DB_SYSTEM_NAME **Tests performed:** - Unit tests: `./gradlew build test` - Smoke/contract tests: `./gradlew appsignals-tests:contract-tests:contractTests` - Manual E2E test with SpringBoot sample app.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1162 +/- ##
=============================================
- Coverage 85.71% 67.28% -18.43%
- Complexity 19 525 +506
=============================================
Files 3 54 +51
Lines 49 2693 +2644
Branches 5 373 +368
=============================================
+ Hits 42 1812 +1770
- Misses 3 746 +743
- Partials 4 135 +131 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
thpierce
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Contract tests use DB_* as well. Do you think we should/should not update them?
...main/java/software/amazon/opentelemetry/javaagent/providers/AwsMetricAttributeGenerator.java
Outdated
Show resolved
Hide resolved
...main/java/software/amazon/opentelemetry/javaagent/providers/AwsMetricAttributeGenerator.java
Show resolved
Hide resolved
...main/java/software/amazon/opentelemetry/javaagent/providers/AwsMetricAttributeGenerator.java
Outdated
Show resolved
Hide resolved
.../java/software/amazon/opentelemetry/javaagent/providers/AwsMetricAttributeGeneratorTest.java
Show resolved
Hide resolved
At the moment, no — otherwise the contract tests would fail. The contract tests are running against the JDBC instrumentation library, which still generates the old attributes by default. Once the library is updated and we integrate it, our contract tests will detect the change, and we will update accordingly. |
…avaagent/providers/AwsMetricAttributeGenerator.java Co-authored-by: Thomas Pierce <[email protected]>
ADOT Java currently uses some deprecated incubating semconv keys. This PR adds support for the newly introduced formal semconv keys that replace them, while maintaining backward compatibility by falling back to the legacy keys when necessary.
Deprecated keys:
(Reference: https://github.com/open-telemetry/semantic-conventions-java/blob/release/v1.34.0/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java#L322-L327)
New keys:
Tests performed:
./gradlew build test./gradlew appsignals-tests:contract-tests:contractTestsBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.